%% Initialize
clear
g = Grid(100, 100);
p = Particles(g, 0.05);
g.plot_grid();
p.plot_particles();
%% run
for i = 1:1000
    tic;
    p.add_particles(2,1,'sweep');
    p.add_particles(2,2,'start');
    p.add_particles(2,3,'sweep');
    p.add_particles(2,4,'start');
    p.push();
    g.dyeing(p);
    g.update_grid();
    p.update_particles();
    t0 = toc;
    pause(0.05-t0);
end